package com.itheima.mapper;

import com.itheima.entity.Members;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MembersMapper {
    List<Members> findByPage(Integer cid, String keyword);

    @Select("select * from tb_members where id = #{id}")
    Members findById(Integer id);

    void save(Members members);

    void update(Members members);

    @Delete("delete from tb_members where id = #{id}")
    void deleteById(Integer id);

    void deleteByIds(Integer[] ids);

    @Select("select * from tb_members")
    List<Members> findAll();
}